/*
 *  n_gauges.cpp
 *  framework
 *
 *  Created by gerhard gubler on 24.11.09.
 *  Copyright 2009 md80.ch . All rights reserved.
 *
 */

#include "n_gauges.h"
#include <string>

using std::string;

void n_gauges::init()
{
	nscr.init();
	mfunc.set_num_textures(1);
	mfunc.set_Texture_name((string)"n2_gauge_bitmap.bmp");
	mfunc.setup_textures(256,256, 1);
}

void n_gauges::display(GLfloat posx, GLfloat posy)
{
	mfunc.showtexture(posx+23, posy+10, 0);
	nscr.display2(posx, posy, nVal);
	mfunc.box3(posx, posy+20, 25, 25);
	mfunc.box3(posx+25, posy+30, 20, 15);
	mfunc.box3(posx, posy-50, 25, 48);
	mfunc.box3(posx+25, posy-50, 22, 38);
	mfunc.line(posx + 25, posy + 10, 0,(nVal-400));
}

void n_gauges::setNval(float val)
{
	nVal = val;
}
